import {QuestionCircleOutlined} from '@ant-design/icons';
import '@umijs/max';
import { SelectLang as UmiSelectLang } from '@umijs/max';
import {useModel} from "@@/exports";
import React from "react";
import {fontSize} from "html2canvas/dist/types/css/property-descriptors/font-size";

export type SiderTheme = 'light' | 'dark';

export const SelectLang = () => {
    return (
        <UmiSelectLang
            style={{
                padding: 4,
            }}
        />
    );
};

export const Question = () => {
    return (
        <div
            style={{
                display: 'flex',
                height: 26,
            }}
            onClick={() => {
                window.open('https://pro.ant.design/docs/getting-started');
            }}
        >
            <QuestionCircleOutlined />
        </div>
    );
};


export const OrgInfo = () => {
    const {initialState} = useModel('@@initialState');
    const {currentUser} = initialState || {};
    return <div style={{float: 'right', display: 'flex'}}>
        <span style={{fontSize:"14px",color:"#3D3D3DFF"}}>{currentUser?.organization?.name}</span>&nbsp;&nbsp;|&nbsp;&nbsp;
        <span style={{fontSize:"14px",color:"#3D3D3DFF"}}>{currentUser?.authority?.authorityName}</span>
    </div>;
};

